package com.zhuoyue.biz.core.api.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhuoyue.biz.core.api.domain.GatewayDO;
import com.zhuoyue.biz.core.api.dto.rep.GatewayRepDTO;

import java.util.List;

/**
 * @author wjming
 * @ClassName: GatewayService
 * @Description:
 * @Date 2021-07-15 14:20
 */
public interface GatewayService extends IService<GatewayDO> {


    /**
     * 新增网关
     *
     * @param gateway
     * @return
     */
    GatewayRepDTO addGateway(GatewayDO gateway);

    /**
     * 修改网关
     *
     * @param gateway
     * @return
     */
    GatewayDO updateGatewayById(GatewayDO gateway);

    /**
     * 删除网关
     *
     * @param gatewayId
     * @return
     */
    Boolean deleteGatewayById(String gatewayId);


    /**
     * 删除网关
     *
     * @param gatewayId
     * @return
     */
    void unbindGatewayById(String gatewayId);

    /**
     * 通过Id获取家庭信息
     *
     * @param homeId
     * @return
     */
    GatewayDO getByHomeId(String homeId);

    /**
     * 清空网关下的场景、自动化、网关定时任务
     *
     * @param gatewayMac
     * @return
     */
    String clearGatewayFrame(String gatewayMac);

    /**
     * 网关复位命令
     *
     * @param gatewayMac
     * @return
     */
    String resetGatewayFrame(String gatewayMac);

    /**
     * 获取网关信息
     *
     * @param homeId
     * @return
     */
    List<GatewayRepDTO> getGatewayMessages(String homeId);
}
